#include <stdio.h>

short time_reg = 0x8888;

void SetHours(int hours)
{
    time_reg = time_reg & 0x07FF;
    time_reg = time_reg | (hours << 11);
}

int getHours()
{
    return (time_reg >> 11);
}

int main()
{
    printf("hours : %d\n", getHours());
    SetHours(8);
    printf("hours : %d\n", getHours());
    SetHours(12);
    printf("hours : %d\n", getHours());
    return 0;
}